/**
 * desc: just for design
 * author: Joe
 * date: 8/15/2018
 */

coreModule.directive('nDesign', function() {
  return {
    restrict: 'A',
    scope: {
      type: '@',
    },
    link: function(scope, ele, attrs) {
      var type = scope.type || 'background';
      var color = attrs.nDesign || 'rgba(3, 115, 229)';
      switch (type) {
        case 'border':
          ele.css('border', '1px solid ' + color);
          break;
        default:
          ele.css(type, color);
          console.log(ele.css(type, color))
      }
    },
  };
});
